<template>
  <el-table :data="logData" border style="width: 100%">
    <el-table-column prop="username" label="登录账户" width="180" />
    <el-table-column
      prop="lastLogin.loginTime"
      label="上次登录时间"
      width="180"
      sortable
    />
    <el-table-column prop="lastLogin.ip" label="上次登入ip" width="180" />
    <el-table-column prop="address" label="Address" />
  </el-table>
</template>
<script setup>
import * as api from "@/api/users";
import { ref, onBeforeMount } from "vue";
//日志数据
let logData = ref([]);
onBeforeMount(async () => {
  //发起请求获取日志数据
  try {
    let res = await api.getLoginApi();
    logData.value = res.data.data;
    // console.log(res);
  } catch (e) {
    console.log(e);
  }
});
</script>
<script>
export default {
  meta: {
    title: "glsy",
    name: "管理首页",
    routeName: "welcome",
    icon: "icon-shouye1",
  },
};
</script>
<style>
.el-breadcrumb {
  margin-bottom: 10px;
}
.cell {
  margin-left: 10px;
}
</style>
